Fractale Tree  0.5
Plot Tree Fractale
Signals | Public Member Functions | Private Attributes | List of all members
QWidget_Config Class Reference

Widget de configuration d'affichage des niveaus des branches. More...

#include <qwidget_config.h>

Inheritance diagram for QWidget_Config:
Inheritance graph
[legend]
Collaboration diagram for QWidget_Config:
Collaboration graph
[legend]

Signals

void Value_changed ()
 

Public Member Functions

 QWidget_Config (QWidget *parent=0)
 
int Get_Niveau ()
 
double Get_SizePen ()
 
double Get_Lenght ()
 
void Set_Niveau (int niveau)
 
void Set_SizePen (double sizePen)
 
void Set_Lenght (double lenght)
 

Private Attributes

QGridLayout * layout
 
QSpinBox * SpinBox_niveau
 
QDoubleSpinBox * DoubleSpinBox_sizePen
 
QDoubleSpinBox * DoubleSpinBox_lenght
 
QLabel * Label_niveau
 
QLabel * Label_sizePen
 
QLabel * Label_lenght
 

Detailed Description

Widget de configuration d'affichage des niveaus des branches.

Widget de configuration d'affichage de niveau des branches.

La classe gere les fonctions de deplacement des branches

Definition at line 22 of file qwidget_config.h.

Constructor & Destructor Documentation

◆ QWidget_Config()

QWidget_Config::QWidget_Config ( QWidget *  parent = 0)
explicit

Definition at line 3 of file qwidget_config.cpp.

References DoubleSpinBox_lenght, DoubleSpinBox_sizePen, Label_lenght, Label_niveau, Label_sizePen, layout, SpinBox_niveau, and Value_changed().

3  : QWidget(parent)
4 {
5 
6  // Init :
7  DoubleSpinBox_lenght= new QDoubleSpinBox();
8  DoubleSpinBox_lenght->setMinimum(10);
9  DoubleSpinBox_lenght->setMaximum(200);
10  DoubleSpinBox_lenght->setValue(100);
11 
12  SpinBox_niveau= new QSpinBox();
13  SpinBox_niveau->setMinimum(0);
14  SpinBox_niveau->setMaximum(15);
15  SpinBox_niveau->setValue(3);
16 
17  DoubleSpinBox_sizePen= new QDoubleSpinBox();
18  DoubleSpinBox_sizePen->setMinimum(1);
19  DoubleSpinBox_sizePen->setMaximum(200);
20  DoubleSpinBox_sizePen->setValue(30);
21 
22  Label_lenght= new QLabel("Longeur");
23  Label_lenght->setAlignment(Qt::AlignHCenter);
24  Label_niveau= new QLabel("Niveau max");
25  Label_niveau->setAlignment(Qt::AlignHCenter);
26  Label_sizePen= new QLabel("Largeur");
27  Label_sizePen->setAlignment(Qt::AlignHCenter);
28  // GridLayou_config
29  QGridLayout *GridLayou_config = new QGridLayout;
30  GridLayou_config->addWidget(Label_niveau,1,1);
31  GridLayou_config->addWidget(Label_lenght,1,2);
32  GridLayou_config->addWidget(Label_sizePen,1,3);
33 
34  GridLayou_config->addWidget(SpinBox_niveau,2,1);
35  GridLayou_config->addWidget(DoubleSpinBox_lenght,2,2);
36  GridLayou_config->addWidget(DoubleSpinBox_sizePen,2,3);
37 
38  //QGroupBox_config
39  QGroupBox *QGroupBox_config = new QGroupBox(tr("Configuration"));
40  QGroupBox_config->setLayout(GridLayou_config);
41 
42  layout = new QGridLayout();
43  layout->addWidget(QGroupBox_config);
44  this->setLayout(layout);
45 
46  //Signale
47  QObject::connect(SpinBox_niveau,SIGNAL(valueChanged(int)),this,SIGNAL(Value_changed()));
48  QObject::connect(DoubleSpinBox_lenght,SIGNAL(valueChanged(double)),this,SIGNAL(Value_changed()));
49  QObject::connect(DoubleSpinBox_sizePen,SIGNAL(valueChanged(double)),this,SIGNAL(Value_changed()));
50 
51 
52 }
QSpinBox * SpinBox_niveau
QDoubleSpinBox * DoubleSpinBox_sizePen
QDoubleSpinBox * DoubleSpinBox_lenght
QLabel * Label_lenght
void Value_changed()
QLabel * Label_sizePen
QGridLayout * layout
QLabel * Label_niveau

Member Function Documentation

◆ Get_Lenght()

double QWidget_Config::Get_Lenght ( )

Definition at line 54 of file qwidget_config.cpp.

References DoubleSpinBox_lenght.

Referenced by Draw_Tree::Plot(), and Main_fenetre::Save_file().

55 {
56  return DoubleSpinBox_lenght->value();
57 }
QDoubleSpinBox * DoubleSpinBox_lenght
Here is the caller graph for this function:

◆ Get_Niveau()

int QWidget_Config::Get_Niveau ( )

Definition at line 59 of file qwidget_config.cpp.

References SpinBox_niveau.

Referenced by Draw_Tree::Plot(), and Main_fenetre::Save_file().

60 {
61  return SpinBox_niveau->value();
62 }
QSpinBox * SpinBox_niveau
Here is the caller graph for this function:

◆ Get_SizePen()

double QWidget_Config::Get_SizePen ( )

Definition at line 64 of file qwidget_config.cpp.

References DoubleSpinBox_sizePen.

Referenced by Draw_Tree::Plot(), and Main_fenetre::Save_file().

65 {
66  return DoubleSpinBox_sizePen->value();
67 }
QDoubleSpinBox * DoubleSpinBox_sizePen
Here is the caller graph for this function:

◆ Set_Lenght()

void QWidget_Config::Set_Lenght ( double  lenght)

Definition at line 70 of file qwidget_config.cpp.

References DoubleSpinBox_lenght.

Referenced by Main_fenetre::Open_file().

71 {
72  DoubleSpinBox_lenght->setValue(lenght);
73 }
QDoubleSpinBox * DoubleSpinBox_lenght
Here is the caller graph for this function:

◆ Set_Niveau()

void QWidget_Config::Set_Niveau ( int  niveau)

Definition at line 75 of file qwidget_config.cpp.

References SpinBox_niveau.

Referenced by Main_fenetre::Open_file().

76 {
77  SpinBox_niveau->setValue(niveau);
78 }
QSpinBox * SpinBox_niveau
Here is the caller graph for this function:

◆ Set_SizePen()

void QWidget_Config::Set_SizePen ( double  sizePen)

Definition at line 80 of file qwidget_config.cpp.

References DoubleSpinBox_sizePen.

Referenced by Main_fenetre::Open_file().

81 {
82  DoubleSpinBox_sizePen->setValue(sizePen);
83 }
QDoubleSpinBox * DoubleSpinBox_sizePen
Here is the caller graph for this function:

◆ Value_changed

void QWidget_Config::Value_changed ( )
signal

Referenced by QWidget_Config().

Here is the caller graph for this function:

Member Data Documentation

◆ DoubleSpinBox_lenght

QDoubleSpinBox* QWidget_Config::DoubleSpinBox_lenght
private

Definition at line 44 of file qwidget_config.h.

Referenced by Get_Lenght(), QWidget_Config(), and Set_Lenght().

◆ DoubleSpinBox_sizePen

QDoubleSpinBox* QWidget_Config::DoubleSpinBox_sizePen
private

Definition at line 43 of file qwidget_config.h.

Referenced by Get_SizePen(), QWidget_Config(), and Set_SizePen().

◆ Label_lenght

QLabel* QWidget_Config::Label_lenght
private

Definition at line 49 of file qwidget_config.h.

Referenced by QWidget_Config().

◆ Label_niveau

QLabel* QWidget_Config::Label_niveau
private

Definition at line 47 of file qwidget_config.h.

Referenced by QWidget_Config().

◆ Label_sizePen

QLabel* QWidget_Config::Label_sizePen
private

Definition at line 48 of file qwidget_config.h.

Referenced by QWidget_Config().

◆ layout

QGridLayout* QWidget_Config::layout
private

Definition at line 40 of file qwidget_config.h.

Referenced by QWidget_Config().

◆ SpinBox_niveau

QSpinBox* QWidget_Config::SpinBox_niveau
private

Definition at line 42 of file qwidget_config.h.

Referenced by Get_Niveau(), QWidget_Config(), and Set_Niveau().


The documentation for this class was generated from the following files: